package com.font {
	import flash.text.Font;
	
	/*
	var fonturl:FontURL = new FontURL();
	var format:TextFormat = new TextFormat();
	format.size = 14;
	format.font = fonturl.getFontName();
	
	var txt:TextField = new TextField();
	txt.text = "华康海报";
	txt.embedFonts = true;
	txt.setTextFormat(format);
	*/
	
	/**
	 * 元数据嵌入字体使用
	 * [Embed(source,fontName,embedAsCFF,unicodeRange,mimeType)] 
	 *  fontFamily
	 */	
	public class FontURL {
		[Embed(source = "assert/DFPHaiBaoW12-GB.ttf", fontName="myfont",embedAsCFF="false",mimeType="application/x-font")]
		private static var font:Class;
		
		public function FontURL() {
			
		}
		
		public function getFontName():String{
			return Font(new font()).fontName;
		}
		
		//在全局字体列表中注册一个字体类。
		public static function registe():void {  
			Font.registerFont(font);  
		}
	}
}